package org.example.rowing.controller;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import lombok.extern.slf4j.Slf4j;
import org.example.rowing.controller.util.NavigationUtil;
import org.springframework.stereotype.Component;
import javafx.event.*;
import java.io.IOException;

@Component
@Slf4j
public class MainController {

    // 点击赛艇按钮时的处理方法
    @FXML
    public void onRowingButtonClicked(ActionEvent event) throws IOException {
        log.info("点击了赛艇按钮");
        NavigationUtil.navigateToScene(event, "/fxml/rowingViews/EventInfoView.fxml", "赛艇管理");
    }

    // 点击皮划艇按钮时的处理方法
    @FXML
    public void onCKButtonClicked(ActionEvent event) throws IOException {
        log.info("点击了皮划艇按钮");
        NavigationUtil.navigateToScene(event, "/fxml/canoeAndKayakViews/CKEventInfoView.fxml", "皮划艇管理");
    }
}
